package com.ssm.controller;
import org.springframework.stereotype.Controller;  
import org.springframework.web.bind.annotation.RequestMapping;  
import org.springframework.web.bind.annotation.RequestMethod;  
import org.springframework.web.servlet.ModelAndView;  
  
import javax.servlet.http.HttpServletRequest;  

@Controller
public class FreemarkerController {

    /**jsp模板的Controller*/  
    @RequestMapping(value="/freeMaker",method={RequestMethod.GET})  
    public ModelAndView getJsp(HttpServletRequest request) {  
  
        ModelAndView mv = new ModelAndView("index");  
        mv.addObject("message1", "切换到jsp模板、");  
        mv.addObject("message2", "我是jsp頁面");  
        mv.setViewName("freeMaker");  
        return mv;  
    }  
}
